package com.ruoyi.school.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.school.mapper.CourseinfoStageMapper;
import com.ruoyi.school.domain.CourseinfoStage;
import com.ruoyi.school.service.ICourseinfoStageService;

/**
 * 专业课详情阶段Service业务层处理
 * 
 * @author admin
 * @date 2023-08-31
 */
@Service
public class CourseinfoStageServiceImpl implements ICourseinfoStageService 
{
    @Autowired
    private CourseinfoStageMapper courseinfoStageMapper;

    /**
     * 查询专业课详情阶段
     * 
     * @param id 专业课详情阶段主键
     * @return 专业课详情阶段
     */
    @Override
    public CourseinfoStage selectCourseinfoStageById(Integer id)
    {
        return courseinfoStageMapper.selectCourseinfoStageById(id);
    }

    /**
     * 查询专业课详情阶段列表
     * 
     * @param courseinfoStage 专业课详情阶段
     * @return 专业课详情阶段
     */
    @Override
    public List<CourseinfoStage> selectCourseinfoStageList(CourseinfoStage courseinfoStage)
    {
        return courseinfoStageMapper.selectCourseinfoStageList(courseinfoStage);
    }

    /**
     * 新增专业课详情阶段
     * 
     * @param courseinfoStage 专业课详情阶段
     * @return 结果
     */
    @Override
    public int insertCourseinfoStage(CourseinfoStage courseinfoStage)
    {
        courseinfoStage.setCreateTime(DateUtils.getNowDate());
        return courseinfoStageMapper.insertCourseinfoStage(courseinfoStage);
    }

    /**
     * 修改专业课详情阶段
     * 
     * @param courseinfoStage 专业课详情阶段
     * @return 结果
     */
    @Override
    public int updateCourseinfoStage(CourseinfoStage courseinfoStage)
    {
        courseinfoStage.setUpdateTime(DateUtils.getNowDate());
        return courseinfoStageMapper.updateCourseinfoStage(courseinfoStage);
    }

    /**
     * 批量删除专业课详情阶段
     * 
     * @param ids 需要删除的专业课详情阶段主键
     * @return 结果
     */
    @Override
    public int deleteCourseinfoStageByIds(Integer[] ids)
    {
        return courseinfoStageMapper.deleteCourseinfoStageByIds(ids);
    }

    /**
     * 删除专业课详情阶段信息
     * 
     * @param id 专业课详情阶段主键
     * @return 结果
     */
    @Override
    public int deleteCourseinfoStageById(Integer id)
    {
        return courseinfoStageMapper.deleteCourseinfoStageById(id);
    }
}
